<?php
// +----------------------------------------------------------------------
namespace app\admin\route;

use think\facade\Route;

// 登录 ---------------------------------------------------
// --------后台管理员信息
Route::rule('userInfo', 'Login/userInfo', 'get');
// --------登录请求
Route::rule('login', 'Login/index', 'post');
// --------验证码
Route::rule('captcha', 'Login/captcha', 'get');
// --------退出登录
Route::rule('logout', 'Login/logout', 'get');

// 上传图片接口
Route::rule('uploadimg', 'Img/uploadimg');

// 中间件 登录后才能访问
Route::group(function () {
    // 用户管理
    Route::rule('user/lst/getlist', 'user.Lst/getlist', 'get');
    Route::rule('user/lst/doedit', 'user.Lst/doedit', 'post');
    Route::rule('user/lst/doSwitch', 'user.Lst/doSwitch', 'post');
    // 资金记录
    Route::rule('user/record/getlist', 'user.Record/getlist', 'get');
    // 球的类型
    Route::rule('ball/types/getlist', 'ball.types/getlist', 'get');
    Route::rule('ball/types/doedit', 'ball.types/doedit', 'post');
    Route::rule('ball/types/doDelete', 'ball.types/doDelete', 'post');
    Route::rule('ball/types/getBallList', 'ball.types/getBallList', 'get');
    // 闪卡
    Route::rule('user/card/getlist', 'user.Card/getlist', 'get');
    Route::rule('user/card/doedit', 'user.Card/doedit', 'post');
    Route::rule('user/card/doDelete', 'user.Card/doDelete', 'post');
    // 闪卡赠送 doSendCard
    Route::rule('user/card/doSendCard', 'user.Card/doSendCard', 'post');
    // 闪卡记录
    Route::rule('user/cardrecord/getlist', 'user.Cardrecord/getlist', 'get');
    // 矿机管理
    Route::rule('user/mining/getlist','user.Mining/getlist', 'get');
    Route::rule('user/mining/doEdit', 'user.Mining/doEdit', 'post');
    Route::rule('user/mining/doDelete', 'user.Mining/doDelete', 'post');
    // 矿机记录
    Route::rule('user/usermining/getlist', 'user.usermining/getlist', 'get');
    // 设置信息
    Route::rule('set/getconfig', 'set/getconfig', 'get');
    Route::rule('set/doEdit', 'set/doEdit', 'post');
    // 碎片数据
    Route::rule('ball/debris/getlist', 'ball.Debris/getlist', 'get');
    // 用户足球数据
    Route::rule('ball/user/getlist', 'ball.User/getlist', 'get');
    // 删除图片
    Route::rule('deleteImg', 'Img/deleteImg');
    // 获取图片
    Route::rule('getImglist', 'Img/getImglist');
    // 公告
    Route::rule('notice/getlist', 'notice/getlist', 'get');
    Route::rule('notice/doedit', 'notice/doedit', 'post');
    Route::rule('notice/doDelete', 'notice/doDelete', 'post');
    // 公告详情
    Route::rule('notice/getContent', 'notice/getContent', 'get');
    // 公告保存
    Route::rule('notice/doContentEdit', 'notice/doContentEdit', 'post');
    // 意见反馈
    Route::rule('proposal/getlist', 'proposal/getlist', 'get');

    // 首页
    Route::rule('index', 'index/index', 'get');

    // 顶商添加成员
    Route::rule('user/lst/doAdd', 'user.lst/doAdd', 'post');
    Route::rule('user/lst/doDel', 'user.lst/doDel', 'post');

})->middleware(\app\admin\middleware\Codelogin::class);
// index
Route::rule('index', 'Index/index', 'get');